package laki.action;

import laki.service.AddCustomerService;
import laki.util.DatabaseCon;

public class AddCustomerAction {
	private String customerName;
	private DatabaseCon con;
	
	
	public String execute(){
		System.out.println(getCustomerName());
		AddCustomerService addCustomerService = new AddCustomerService();
		String result = addCustomerService.addCustomer(getCustomerName(), DatabaseCon.connection);
		System.out.println(result);
		return "success";
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public DatabaseCon getCon() {
		return con;
	}

	public void setCon(DatabaseCon con) {
		this.con = con;
	}


}
